package cn.lzx.feign;

import cn.lzx.domain.JsonResult;
import cn.lzx.dto.UserMovieDto;
import feign.hystrix.FallbackFactory;

public class MovieFeignFallbackFactory implements FallbackFactory<MovieFeign> {


    @Override
    public MovieFeign create(Throwable cause) {
        return new MovieFeign() {
            @Override
            public JsonResult findById(Long id) {
                return new JsonResult(false,"查询电影失败");
            }

            @Override
            public JsonResult getTicket(Long userId) {
                return new JsonResult(false,"获取电影失败");
            }

            @Override
            public JsonResult buyTicket(UserMovieDto UserMovieDto) {
                return new JsonResult(false,"购买电影失败");
            }
        };
    }
}
